﻿using System;
using System.Web.UI;
using ltModel;

public partial class ltMan_leaders_leaderAdd : AdminBasePage
{
    ltModel.BLL.juanzeng ltbl = new ltModel.BLL.juanzeng();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string id = Request.QueryString["id"].ToString();
            if (Str.IsInt(id))
            {
                ltModel.Model.juanzeng ltbo = ltbl.GetModel(int.Parse(id));
                name.Text = ltbo.name.Trim();
                dh.Text = ltbo.dh.Trim();
                address.Text = ltbo.address.Trim();
                danwei.Text = ltbo.danwei.Trim();
                yuanyin.Text = ltbo.yuanyin.Trim();
                jhq.Text = ltbo.jhq.Trim();
                addtime.Text = ltbo.addtime.Trim();
            }
            
        }
    }
    //protected void RadSave_Click(object sender, EventArgs e)
    //{
    //    string id = Request.QueryString["id"];
    //    bool inEdit = Str.IsInt(id);
    //    ltModel.Model.xmsq ltbo = null;
    //    if (inEdit)
    //        ltbo = ltbl.GetModel(int.Parse(id));
    //    else
    //        ltbo = new ltModel.Model.xmsq();

    //    ltbo.sqdw = DataProtector.ToSBC(sqdw.Text.Trim());
    //    ltbo.dwfzr = DataProtector.ToSBC(dwfzr.Text.Trim());
    //    ltbo.lxdh = DataProtector.ToSBC(lxdh.Text.Trim());
    //    ltbo.phone = DataProtector.ToSBC(phone.Text.Trim());
    //    ltbo.xmmc = DataProtector.ToSBC(xmmc.Text.Trim());
    //    ltbo.xmfzr = DataProtector.ToSBC(xmfzr.Text.Trim());
    //    ltbo.dh = DataProtector.ToSBC(dh.Text.Trim());
    //    ltbo.xmdd = DataProtector.ToSBC(xmdd.Text.Trim());
    //    ltbo.xmsj = DataProtector.ToSBC(xmsj.Text.Trim());
    //    ltbo.jfly = DataProtector.ToSBC(jfly.Text.Trim());
    //    ltbo.xmjf = DataProtector.ToSBC(xmjf.Text.Trim());
    //    ltbo.sbxm = DataProtector.ToSBC(sbxm.Text.Trim());

    //    if (inEdit)
    //    {
    //        ltbl.Update(ltbo);
    //        OperateLog.AddSuccessLog(CurrentUser.user_id, Request.UserHostAddress, "领导信息-修改>" + ltbo.sqdw);
    //    }
    //    //else
    //    //{
    //    //    ltbl.Add(ltbo);
    //    //    OperateLog.AddSuccessLog(CurrentUser.user_id, Request.UserHostAddress, "领导信息-添加>" + ltbo.tname);
    //    //}


    //    infoPanel.AddSuccessInfo(inEdit ? "修改成功" : "添加成功");
    //    AddScriptM("setTimeout(parent.reloadData, 300);");
    //}
}